package com.xuecheng.learning.agent;

import com.xuecheng.api.learning.model.vo.ResourceUrlModel;
import com.xuecheng.common.constant.XcFeignServiceNameList;
import com.xuecheng.common.domain.response.RestResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 *  Feign远程调用 教学机构管理
 */
@FeignClient(value = XcFeignServiceNameList.XC_MEDIA_SERVICE)
public interface MediaApiAgent {

    String SERVICE_CONTEXT_PRE = "/media/";

    /**
     * 根据租户Id获取机构信息（机构时一种租户）
     *
     * @return
     */
    @GetMapping(SERVICE_CONTEXT_PRE + "l/media-url/{mediaId}")
    RestResponse<ResourceUrlModel> getResourceById4s(@PathVariable Long mediaId);
}
